package com.chepaandvasia.dao;

import java.util.List;

import com.chepaandvasia.entities.Address;
import com.chepaandvasia.entities.Car;
import com.chepaandvasia.entities.Customer;

public interface CustomerDAO {

    /*
     * This method inserts Customer customer in the database.
     * While inserting, customer is given unique id
     * @param customer instance of Customer  to be created     
     */
    public void create(Customer customer);

    /*
     * This method get instance of Customer, specified with given id, from database.
     * @param id id of Customer to be retrieved
     * @return instance of Customer with given id     
     */
    public Customer get(Long id);

    /*
     * This method updates state of Customer into database
     * @param customer instance of Customer to be updated in database     * 
     */
    public void update(Customer customer);

    /*
     * This method removes Customer customer from database.
     * @param car instance of Customer to be removed
     */
    public void remove(Customer customer);
    
    /*
     * This method finds all available customers for given car.
     * @param car instance of Car
     * @return list of Customers of given car
     */
    public List<Customer> findAllCustomersForCar(Car position);

    /*
     * This method find all customers including .
     * @return list of all Customers 
     */
    public List<Customer> findAllCustomers();
        
    /*
     * This methd return all Customer with selected address
     * @param address = Address
     * @return list of all Customer with this address
     */
    public List<Customer> getCustomersByAddress(Address address);
    
}